package cn.com.blueInfo.HaiYuan.business.invoice.controller;

import cn.com.blueInfo.HaiYuan.business.invoice.service.InvoiceBaseService;
import cn.com.blueInfo.utils.result.BootstrapTable;
import cn.com.blueInfo.utils.result.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 发票基本信息管理
 * @ClassName: InvoiceBaseController
 * @author suxch
 * @date 2019年4月24日  上午10:29:03
 */
@RestController
@RequestMapping("/operation/business/invoiceBase")
public class InvoiceBaseController {

    @Autowired
    private InvoiceBaseService baseService;

    /**
     * 分页查询发票基本信息
     * @Title: queryInvoiceBaseInfoByPage
     * @param request
     * @return BootstrapTable
     * @throws
     */
    @RequestMapping("/queryInvoiceBaseInfoByPage.do")
    public BootstrapTable queryInvoiceBaseInfoByPage(HttpServletRequest request) {
        return baseService.queryInvoiceBaseDataByPage(request);
    }

    /**
     * 新增发票基本信息
     * @Title: addInvoiceBaseInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/addInvoiceBaseInfo.do")
    public ResultInfo addInvoiceBaseInfo(HttpServletRequest request) {
        return baseService.addInvoiceBaseData(request);
    }

    /**
     * 更新发票基本信息
     * @Title: updateInvoiceBaseInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/updateInvoiceBaseInfo.do")
    public ResultInfo updateInvoiceBaseInfo(HttpServletRequest request) {
        return baseService.updateInvoiceBaseData(request);
    }

    /**
     * 删除发票基本信息
     * @Title: deleteInvoiceBaseInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/deleteInvoiceBaseInfo.do")
    public ResultInfo deleteInvoiceBaseInfo(HttpServletRequest request) {
        return baseService.deleteInvoiceBaseData(request);
    }

}
